package com.hotel.hotelsystem.controller;

import com.hotel.hotelsystem.pojo.HotelInfo;
import com.hotel.hotelsystem.service.HotelInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;

@RestController
public class HotelInfoController {

    @Autowired
    private HotelInfoService hotelInfoService;

    @GetMapping("hotelInfo/{hotelId}")
    public HotelInfo selectByHotelId(@PathVariable("hotelId") String hotelId){
        return hotelInfoService.getById(hotelId);
    }

}
